<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>商品促销价</title>
</head>
<body>
<form method="post" action="Zk.php">
    今天商品原价:<input type="text" name="yuan" value="500"/>
    折扣：
    <select name="discount">
        <option>九折</option>
        <option>八折</option>
        <option>七折</option>
        <option>六折</option>
        <option>五折</option>
    </select>
    <input type="submit" value="计算"/>
</form>
<?php
$yuan=$_POST['yuan'];
$discount=$_POST['discount'];
switch ($discount){
    case "九折":
        $discount=0.9;
        break;
    case "八折":
        $discount=0.8;
        break;
    case "七折":
        $discount=0.7;
        break;
    case "六折":
        $discount=0.6;
        break;
    case "五折":
        $discount=0.5;
        break;
    default :
        $discount=1.0;
        break;
}
$yuan=$yuan*$discount;
echo "商品折扣后价格是:" . $yuan ."元";
?>
</body>
</html>